c06ekf
c06ekf
© Numerical Algorithms Group, 2002.
Purpose
C06EKF Circular convolution or correlation of two real vectors, no extra
workspace
Synopsis
[x,y,ifail] = c06ekf(job,x,y<,ifail>)
Description
This routine computes:
if JOB =1, the discrete convolution of x and y, defined by:
n-1 n-1
-- --
z = > x y = > x y ;
k -- j k-j -- k-j j
j=0 j=0
if JOB =2, the discrete correlation of x and y defined by:
n-1
--
w = > x y .
k -- j k+j
j=0
Here x and y are real vectors, assumed to be periodic, with
period n, i.e., x =x =x =...; z and w are then also
j j+-n j+-2n
periodic with period n.
^ ^ ^ ^
If x, y, z and w are the discrete Fourier transforms of these
sequences,
n-1
^ 1 -- ( 2(pi)jk)
i.e., x = --- > x *exp(-i -------), etc,
k _ -- j ( n )
\/n j=0
^ _ ^ ^
then z =\/n.x y
k k k
_
^ _ ^ ^
and w =\/n.x y
k k k
(the bar denoting complex conjugate).
This routine calls the same auxiliary routines as C06EAF and
C06EBF to compute discrete Fourier transforms, and there are some
restrictions on the value of n.
Parameters
c06ekf
Required Input Arguments:
job integer
x (:) real
y (:) real
Optional Input Arguments: <Default>
ifail integer -1
Output Arguments:
x (:) real
y (:) real
ifail integer